@extends('member.member')

@section('title', '我的简历')

@section('rightcontainer')
<link href="{{ asset('/addons/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css') }}" rel="stylesheet">
<script src="{{ asset('/addons/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js') }}" type="text/javascript"></script>
<script src="{{ asset('/addons/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js') }}" type="text/javascript"></script>
@include('front.common.editor')
<div class="member-container resume fl">
    <div class="resume-header">
        <img src="{{asset('/images/front/member/bg.jpg')}}">
        <div class="resume-header-logo">
            <img src="{{$userinfo->logo}}">
        </div>
    </div>
    <div class="resume-userinfo">
        <div class="resume-userinfo-title mr_w840 mb-15 @if(empty($userinfo->real_name)) hide @endif" id="name_show">
            <span class="mr_edit line-50 hide" onclick="resumeEdit('name_edit','name_show')"><i></i><em>编辑</em></span>
            <span  class="userinfo-show user-name">{{$userinfo->real_name}}</span>
        </div>
        <form id="name_edit" class="@if(!empty($userinfo->real_name)) hide @endif">
            {!! csrf_field() !!}
            <div class="mr_intro_edit">
        		<input type="text" id="real_name" name="real_name"  class="ed_name" value="{{$userinfo->real_name}}">
        		<a class="save" onclick="saveResume('/member/user','name_edit','name_show')">保存</a>
        		<a href="javascript:;" class="cancel" onclick="resumeEdit('name_edit','name_show')">取消</a>
        		<span class="mroneError hide" style="display: block;">必填</span>
        	</div>
        </form>
        <div class="resume-userinfo-center mr_w840 mb-15" id="signature_show">
            <span class="mr_edit line-34 hide" onclick="resumeEdit('signature_edit','signature_show')"><i></i><em>编辑</em></span>
            <span  class="userinfo-show">{{$userinfo->signature}}</span>
        </div>
        <form id="signature_edit" class="hide">
            {!! csrf_field() !!}
            <div class="mr_intro_edit">
        		<input type="text" id="signature" name="signature" placeholder="一句话介绍自己，告诉我为什么选择你而不是别人" value="{{$userinfo->signature}}" class="ed_name" autocomplete="off">
        		<a class="save" onclick="saveResume('/member/user','signature_edit','signature_show')">保存</a>
        		<a href="javascript:;" class="cancel" onclick="resumeEdit('signature_edit','signature_show')">取消</a>
        		<span class="mroneError hide" style="display: block;">必填</span>
        	</div>
        </form>
        <div class="resume-userinfo-center mr_w840" id="moreinfo_show">
            <div class="mb-10">
                <span class="mr_edit hide" onclick="resumeEdit('moreinfo_edit','moreinfo_show')"><i></i><em>编辑</em></span>
                <span  class="userinfo-show">
                    <img src="{{ asset('/images/front/member/home.jpg')}}">
                    <span class="ml-10">{{$userinfo->shenfen}}</span>
                </span>
            </div>
            <div class="mb-10">
                <span  class="userinfo-show">
                    <img src="{{ asset('/images/front/member/data.jpg')}}">
                    <span class="ml-10">
                        {{$userinfo->sex == 0?'女':'男'}}&nbsp;&nbsp;
                         {{$userinfo->age}}岁&nbsp;&nbsp;
                        {{$degree[$userinfo->degree]}}&nbsp;&nbsp;
                        {{$gznx[$userinfo->gznx]}} @if($userinfo->gznx != 0)工作经验@endif
                    </span>
                </span>
            </div>
            <div class="mb-10">
                <span  class="userinfo-show">
                    <img src="{{ asset('/images/front/member/call.jpg')}}">
                    <span class="ml-10">
                        {{$userinfo->phone}}&nbsp;&nbsp;&nbsp;&nbsp;
                        <i class="icon-envelope"></i>&nbsp;{{$userinfo->email}}
                    </span>
                </span>
            </div>
        </div>
        <div class="mr_w840">
            <form class="hide" id="moreinfo_edit">
                 {!! csrf_field() !!}
                <div class="mr_add_work">
                    @if(!empty($educational))
                    <div class="form-group clearfix">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">显示身份</label>
                        <div class="col-sm-9 col-xs-12">
                            <select name="shenfen" class="form-control">
                                @foreach($educational as $educa)
                                <option value="{{$educa->major}} · {{$educa->school}}" @if($userinfo->shenfen == $educa->major." · ".$educa->school) selected @endif>{{$educa->major}} · {{$educa->school}}</option>
                                @endforeach
                            </select>
                        </div>
                    </div>
                    @endif
                    <div class="form-group clearfix">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">性别</label>
                        <div class="col-sm-9 col-xs-12" style="text-align: left;">
                            <input type="radio" name="sex" value="1" @if($userinfo->sex == 1) checked @endif>男 &nbsp;&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="sex" value="0" @if($userinfo->sex != 1) checked @endif>女
                        </div>
                    </div>
                    <div class="form-group clearfix">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">出生年月</label>
                        <div class="col-sm-4 col-xs-12">
                            <input size="16" type="text" class="form_datetime date form-control" name="birth" value="@if(!empty($userinfo->birth_year)){{$userinfo->birth_year}}-{{$userinfo->birth_month}}@else{{date('Y-m')}}@endif" data-date-format="yyyy-mm" readonly>
                        </div>
                    </div>
                    <div class="form-group clearfix">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">最高学历</label>
                        <div class="col-sm-9 col-xs-12">
                            <select class="form-control" name="degree">
                                @foreach($degree as $key=>$dg)
                                <option value="{{$key}}"  @if($key == $userinfo->degree) selected @endif>{{$dg}}</option>
                                @endforeach
                            </select>
                        </div>
                    </div>
                    <div class="form-group clearfix">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">工作年限</label>
                        <div class="col-sm-9 col-xs-12">
                            <select class="form-control" name="gznx">
                                @foreach($gznx as $k=>$gx)
                                <option value="{{$k}}" @if($k == $userinfo->gznx) selected @endif>{{$gx}}</option>
                                @endforeach
                            </select>
                        </div>
                    </div>
                    <div class="form-group clearfix">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">所在城市</label>
                        <div class="col-sm-3">
                            <select class="form-control" onchange="childAreas(this.value,'areas','city')" name="province" id="province">
                                <option>---选择省份---</option>
                                @foreach($area as $are)
                                <option value="{{$are->area_id}}"  @if($userinfo->province == $are->area_id) selected @endif>{{$are->title}}</option>
                                @endforeach
                            </select>
                        </div>
                        <div class="col-sm-3">
                            <select class="form-control" onchange="childAreas(this.value,'areas','area')" name="city" id="city">
                                @if($userinfo->city > 0 )
                                <option value="{{$userinfo->city}}">{{$userinfo->cityname}}</option>
                                @else
                                <option>---选择市---</option>
                                @endif
                            </select>
                        </div>
                    </div>
                    <div class="form-group clearfix">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">手机号码</label>
                        <div class="col-sm-9 col-xs-12">
                            <input type="text" class="form-control" name="phone" value="{{$userinfo->phone}}">
                        </div>
                    </div>
                    <div class="form-group clearfix">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label">联系邮箱</label>
                        <div class="col-sm-9 col-xs-12">
                            <input type="text" class="form-control" name="email" value="{{$userinfo->email}}">
                        </div>
                    </div>
                    <div class="form-inline mt-20">
                        <div class="form-group">
                          <input type="hidden" name="status" value="1">
                           <span class="resume-btn-ok"  onclick="saveUserInfo('/member/user','moreinfo_edit','moreinfo_show')">
                                保存
                          </span>  
                        </div>
                        <div class="form-group col-xs-offset-1">
                             <span class="resume-btn-cancel"  onclick="resumeEdit('moreinfo_edit','moreinfo_show')">
                                取消
                            </span>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    @include('member.resume.experience')
    @include('member.resume.educational')
    @include('member.resume.projects')
    @include('member.resume.intro')
    @include('member.resume.expect')
    <div class="mr_self_state">
		<div class="form_wrap dropdown">
 		    <input id="resume_status" name="resume_status" type="button" class="form-control mr_button" data-toggle="dropdown" 
 		     aria-haspopup="true" aria-expanded="false" value="{{(count($otherinfo)>0&&count($otherinfo->resume_status)>0)?$otherinfo->resume_status->name:'我是应届毕业生'}}">
			<i class="mr_sj"></i>
			<div class="xl_list dropdown-menu" aria-labelledby="dLabel">
 				<ul class="ul_self_state">
 				   @foreach($resumeStatus as $rs)
                    <li><a href="javascript:void(0)" onclick="ChangeResumeStatus('{{$rs->name}}')">{{$rs->name}}</a></li>
 				   @endforeach
 				</ul>
			</div>						   	 				
		</div>					
	</div>
</div>
<script type="text/javascript">
<!--
editorInit();
$('input').iCheck({
	checkboxClass: 'icheckbox_flat-blue',
    radioClass: 'iradio_flat-blue',
    increaseArea: '-10' // optional
});
$('.form_datetime').datetimepicker({
    format:'yyyy-mm',
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 4,
    minView: 3,
    forceParse: 0
});
$('.form_datetime2').datetimepicker({
    format:'yyyy',
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 4,
    minView: 4,
    forceParse: 0
});
//-->
</script>
@stop

<!-- 底部块 -->
@section('footer')
    @parent
@stop